package com.example.demo.cglib;

import java.util.*;

/**
 * @ClassName SubList
 * @Description TODO
 * @Author hly
 * @Date 2018\11\27 0027 17:31
 */
public class SubListTest {
    public static void main(String[] args) {
        List<String> a = new ArrayList<>();
        a.add("1");
        a.add("2");
        a.add("3");
        a.forEach(System.out::println);
        Iterator<String> it = a.iterator();
        while(it.hasNext()){
            String temp = it.next();
            if ("3".equals(temp)){
                it.remove();
            }
        }
        Map<String,String> map = new HashMap<>();
        map.forEach((k,v)->System.out.println("key : " + k + "; value : " + v));

        a.forEach(System.out::println);

    }

}
